#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int fib(int n)
{
	int b = 1;
	int c = 1;
	int d = 1;
	while (n > 2)
	{
		d = b + c;
		b = c;
		c = d;
		n--;
	}
	return c;
}
int main()
{
	int n = 0;
	scanf_s("%d", &n);
	//int ret = fib(n);
	printf("%d\n", fib(n));
	return 0;
}